﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using MDL;

namespace BLL
{
    public class BLL_Vips
    {
        /// <summary>
        /// 查询会员信息
        /// </summary>
        /// <param name="name">根据姓名模糊查询</param>
        /// <returns>会员信息</returns>
        public static List<Vips> SelectVips(string name)
        {
            return DAL_Vips.SelectVips(name);
        }
        /// <summary>
        /// 增加会员信息
        /// </summary>
        /// <param name="v">会员信息</param>
        /// <returns>受影响的行数</returns>
        public static int AddVips(Vips v)
        {
            return DAL_Vips.AddVips(v);
        }
        /// <summary>
        /// 修改会员信息
        /// </summary>
        /// <param name="v">会员信息</param>
        /// <returns>受影响的行数</returns>
        public static int UpdateVips(Vips v)
        {
            return DAL_Vips.UpdateVips(v);
        }
        /// <summary>
        /// 删除会员信息
        /// </summary>
        /// <param name="v">会员信息</param>
        /// <returns>受影响的行数</returns>
        public static int DeleteVips(int id)
        {
            return DAL_Vips.DeleteVips(id);
        }
        /// <summary>
        /// 根据姓名或编号查询会员信息
        /// </summary>
        /// <param name="name">会员姓名</param>
        /// <param name="id">会员id</param>
        /// <param name="b">根据哪个查询</param>
        /// <returns>会员信息</returns>
        public static Vips SelectInfo(string name, int id, bool b)
        {
            return DAL_Vips.SelectInfo(name, id, b);
        }
    }
}
